package com.framework.model.system.vo;

import com.framework.common.annotation.QueryParam;
import com.framework.common.model.validation.ValidationGroup;
import com.framework.model.system.SystemUser;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * @author 龘鵺
 * @version 1.0
 * @className com.framework.model.system.vo
 * @description 系统用户视图类
 * @datetime 2022-01-09 11:11:11
 */
public class SystemUserVo extends SystemUser implements Serializable {
    /**
     * 旧密码
     */
    private String oldPassword;
    /**
     * 角色编号
     */
    private String roleId;
    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 确认密码
     */
    @NotBlank(message = "请输入确认密码", groups = {ValidationGroup.formAdd.class, ValidationGroup.formPassword.class})
//    @Size(message = "确认密码最少6至最多25个字符", min = NumeralUtil.POSITIVE_SIX, max = NumeralUtil.POSITIVE_TWENTY_FIVE, groups =
//            {ValidationGroup.formAdd.class, ValidationGroup.formPassword.class})
    private String confirmPassword;
    /**
     * 角色集合
     */
    private List<String> roleCodeList;
    /**
     * 角色代码
     */
    @QueryParam(code = "sr.ROLE_CODE")
    private String roleCode;
    /**
     * jwt代码
     */
    private String token;
    /**
     * 数据来源
     */
    private Integer sources;

    private static final long serialVersionUID = 1L;

    public String getOldPassword() {
        return oldPassword;
    }

    public void setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword == null ? null : oldPassword.trim();
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }


    public String getConfirmPassword() {
        return confirmPassword;
    }

    public void setConfirmPassword(String confirmPassword) {
        this.confirmPassword = confirmPassword == null ? null : confirmPassword.trim();
    }

    public List<String> getRoleCodeList() {
        return roleCodeList;
    }

    public void setRoleCodeList(List<String> roleCodeList) {
        this.roleCodeList = roleCodeList;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode == null ? null : roleCode.trim();
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token == null ? null : token.trim();
    }

    public Integer getSources() {
        return sources;
    }

    public void setSources(Integer sources) {
        this.sources = sources;
    }
}
